﻿<table class="layui-hide" id="table-userlog" lay-filter="table-userlog"></table>
<script type="text/javascript">

    layui.use('table', function () {
        table = layui.table;
        table.render({
            elem: '#table-userlog'
            , url: '../user/listlog'
            ,limit:20
            , cols: [[
                {field: 'ip', title: 'IP'}
                , {field: 'logType', title: '类型'}
                , {field: 'created', title: '时间', sort: true}
            ]]
            , page: true
            , height: 'full-125'
            , cell: function (field, item) {
                if (field == "created") {
                    return workUtils.toDate(item.created);
                }
                return item[field];
            }
        });
    });
</script>